<template>
	<view class="pages">
		<view class="newest-item" v-for="(item,index) in newComments" :key="index">
			<view class="newest-item-info">
				<view class="newest-item-info-left">
					<u-avatar :src="item.user.avatarUrl" size="50"></u-avatar>
					<view class="newest-item-info-left-name">
						<u--text :text="item.user.nickname" size="18px"></u--text>
						<u--text :text="item.time" size="12px" mode="date" color="#ccc"></u--text>
					</view>
				</view>
				<view class="newest-item-info-right">
					<u--text :text="item.likedCount" size="16px"></u--text>
					<u-icon name="thumb-up" size="28px"></u-icon>
				</view>
				
			</view>
			<view class="newest-item-content">
				<u--text :text="item.content" size="16px"></u--text>
				<u-line margin="10px 0px"></u-line>
			</view>
		</view>
		<u-divider text="到底啦"></u-divider>
	</view>
</template>

<script>
	export default {
		props: ['newComments']
	}
</script>

<style lang="scss" scoped>
	.pages{
		// background-color: #f6f6f6;
	}
	
	.newest-item {
		display: flex;
		flex-direction: column;

		&-content {
			width: 80%;
			padding: 10rpx 15rpx 0rpx 110rpx;
		}

		&-info {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 15rpx;

			&-left {
				display: flex;
				align-items: center;


				&-name {
					display: flex;
					flex-direction: column;
					justify-content: center;
					margin-left: 15rpx;
				}
			}

			&-right {
				display: flex;
			}

		}
	}
</style>
